<?php

?>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title><?=$this->lang->line('site_title');?></title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>	
	<meta http-equiv="cache-control" content="max-age=0" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />
	<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
	<meta http-equiv="pragma" content="no-cache" />

	<link rel="stylesheet" href="<?=base_url()?>assets/css/jquery-ui-1.10.2.custom.min.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/jquery.ui.chatbox.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/kendo.common.min.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/kendo.default.min.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/style.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/text-buble.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/icons.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/contextmenu.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/jPicker-1.1.6.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/jquery.touchpanview.css" />
	<link rel="stylesheet" href="<?=base_url()?>assets/css/core.css" type="text/css" media="print" />
	
	<!-- Le fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
                                   <link rel="shortcut icon" href="assets/ico/favicon.png">
	
	
	<script src="<?=$this->config->item('awb_node_server_ip');?>:<?=$this->config->item('awb_node_server_port');?>/socket.io/socket.io.js"></script>
	<script src="<?=base_url()?>assets/js/libs/json2.min.js"></script>
	<script src="<?=base_url()?>assets/js/libs/l10n.min.js"></script> 
	<script src="<?=base_url()?>assets/js/libs/localizations.js"></script>

	<script type="text/javascript"> 
	var filename="<?=$file_name?>";
    function toggle_visibility(id) { 
       var e = document.getElementById(id);
       var a = document.getElementById('maximize');
       if(e.style.display == 'block'){
          e.style.display = 'none';
          a.style.display = 'block';
        
		  }
       else{
          e.style.display = 'block';
          a.style.display = 'none';
		  }
    }
	
	function max_visibility(id) {
       var e = document.getElementById(id);
	   var a = document.getElementById('maximize');
       if(a.style.display == 'block'){
          a.style.display = 'none';
          e.style.display = 'block';
		  }
       else{
          a.style.display = 'block';
          e.style.display = 'none';
		  }
    }

	// function SetZoom()
	// { 
			 // document.body.style.zoom = "100%"; 
	// }
	function Maximize() 
	{
		window.innerWidth = screen.width;
		window.innerHeight = screen.height;
		window.screenX = 0;
		window.screenY = 0;
		alwaysLowered = false;
	}
	function onnload(){ 
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ // MSIE x.x; 
			var ieversion=new Number(RegExp.$1);
			if(ieversion<9){
				alert("<?=$this->lang->line('compatible_ie');?>"); 
				window.location.href = baseurl + "auth/logout";  
			}
		}
	}
	window.onload = onnload;
	</script>
	 
</head>

<body lang="ja" style="zoom:100%;" onload=""> 
<script src="<?=base_url()?>assets/js/libs/socket.io.min.js"></script>
 


<div id="window"></div>
<section class="contents-preview" >	
	<div id="overlay-event"></div>
	<div id="overlay" style="display:block">
		<img id="img-loading" src="<?=base_url()?>assets/css/images/ajax_loader.gif" alt="Loading" />
	</div>
	<div id="header" > 
		<div class="cloud" ></div> 
		
		<div class="menuboxPrint" style="text-align: center; margin-top:15px;">
			<b><?=$this->lang->line('preview_header');?> <?=$file_name?></b>
		</div>	
		<div class="toolboxPrint" style="text-align: center;">
			<img onclick="App.zoomPlus();" style="margin-top:6px;margin-right:6px;" onmouseover="this.src='<?=base_url();?>assets/css/images/zoomin.png'" onmouseout="this.src='<?=base_url();?>assets/css/images/zoomin.png'" src="<?=base_url();?>assets/css/images/zoomin.png" title="<?=$this->lang->line('tooltip_zoom_in');?>">
			<img onclick="App.zoomSmall();" style="margin-top:6px;margin-right:6px;" onmouseover="this.src='<?=base_url();?>assets/css/images/zoomout.png'" onmouseout="this.src='<?=base_url();?>assets/css/images/zoomout.png'" src="<?=base_url();?>assets/css/images/zoomout.png" title="<?=$this->lang->line('tooltip_zoom_out');?>">
			 			
		</div>
		
		<div class="accountbox"><span><?php echo $user->username ?></span><br/><a href=""></a></div>
	</div>
	<br>
	<table id="previewArea_tbl class="content" width="100%" height="100%">
		<!--<tr style="border:1px solid black">
			<td align="center" valign="center" style="margin-bottom:30px;height:20%;">
				<img onclick="App.zoomPlus();" style="margin-top:4px;" onmouseover="this.src='<?=base_url();?>assets/css/images/zoomin.png'" onmouseout="this.src='<?=base_url();?>assets/css/images/zoomin.png'" src="<?=base_url();?>assets/css/images/zoomin.png" title="<?=$this->lang->line('tooltip_zoom_in');?>">
				<img onclick="App.zoomSmall();" style="margin-top:4px;" onmouseover="this.src='<?=base_url();?>assets/css/images/zoomout.png'" onmouseout="this.src='<?=base_url();?>assets/css/images/zoomout.png'" src="<?=base_url();?>assets/css/images/zoomout.png" title="<?=$this->lang->line('tooltip_zoom_out');?>">
			</td>
		</tr>-->
		<tr >				
			<td  align="center" valign="top" style="height:80%;"> 
					<div id="areaPreview" align="left" style="display:block; width: 250px; height: 140px;">
								
						<div id="rootContainer"  style="
								border:2px solid blue;
								top: 0px; left: 0px;   
								background-color: rgb(255, 255, 255); 
								background-repeat: no-repeat;
								background-position: center center;  
								transform : scale(0.18);
								transform-origin : 0% 0%;
								-webkit-transform-origin : 0% 0%;
								-moz-transform-origin : 0% 0%;
								-ms-transform-origin : 0% 0%;
								-o-transform-origin : 0% 0%; 
								">
						</div> 				
					</div>
			</td>
		
		</tr> 
		
	</table> 
</section>

<input id="base_url" type="hidden" value="<?=base_url();?>"/>
<input id="node_url" type="hidden" value="<?=$this->config->item('awb_node_server_ip');?>:<?=$this->config->item('awb_node_server_port');?>"/>
<input id="file_id" type="hidden" value="<?=$file_id;?>"/>
<input id="page_id" type="hidden" value="<?=$page_id;?>"/>
<input id="u_name" type="hidden" value="<?=$user->username;?>"/>
<input id="u_id" type="hidden" value="<?=$user->id;?>"/>
<input id="app_lang" type="hidden" value="<?=$this->config->item('language');?>"/>
<script type="text/javascript" src="<?=base_url()?>assets/js/libs/require.js" data-main="<?=base_url()?>assets/js/main-draw-preview"></script>
</body>
</html>
